<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Bandit-Blog前台</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/public.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/pigeonhole.css">
</head>
<body>
<%
    request.setAttribute("pigeonhole","layui-this");
%>
<c:import url="commons/header.jsp"></c:import>

<div class="layui-container">

    <!-- 上边界 -->
    <div class="layui-edge-top"> </div>
    <div class="layui-edge-top layui-show-sm-block layui-hide-lg"></div>
    <div class="layui-row">
        <!-- 头 -->
        <div class="layui-col-lg12 layui-col-sm12">
            <div class="layui-card header-card">
                <div class="layui-card-header">归档</div>
            </div>
        </div>
        <!-- 中间 -->
        <div class="layui-col-lg12 layui-col-sm12">
            <div class="layui-card">
                <div class="layui-collapse">
                    <c:forEach items="${DateInfo}" var="BlogMap">
                        <div class="layui-colla-item">
                            <h2 class="layui-colla-title">${BlogMap.key}</h2>
                            <div class="layui-colla-content layui-show">
                                <ul>
                                <c:forEach items="${BlogMap.value}" var="blog">
                                    <li>
                                        <div class="layui-card body-card">
                                            <div class="layui-card-body">
                                                <a class="title" href="/toDetails?id=${blog.id}">
                                                    标题：${blog.title}
                                                    概要：${blog.summary}
                                                </a>
                                            </div>
                                        </div>
                                    </li>
                                </c:forEach>
                                </ul>
                            </div>
                        </div>
                    </c:forEach>
                </div>
            </div>
        </div>
        <!-- 尾 -->
        <div class="layui-col-lg12 layui-col-sm12">
            <div class="layui-card">
                <div class="layui-card-body footer-card">
                    还没想好写啥
                </div>
            </div>
        </div>
    </div>
</div>


<script src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
<!-- 脚本 -->
<script>
    console.log(${DateInfo})
    //JS
    layui.use(['element', 'layer', 'util', 'laydate','carousel'], function () {
        var element = layui.element,
            laydate = layui.laydate,
            layer = layui.layer,
            util = layui.util,
            carousel = layui.carousel,
            $ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            menuRight: function () {
                layer.open({
                    type: 1,
                    content: '<div style="padding: 15px;">处理右侧面板的操作</div>',
                    area: ['260px', '100%'],
                    offset: 'rt' //右上角
                    ,
                    anim: 5,
                    shadeClose: true
                });
            }
        });
    });
</script>
</body>
</body>
</html>
